package sensoreColore;
/**
 * @author  Giovanni
 */
public class Coordinate implements Comparable<Coordinate>{
	
	/**
	 * @uml.property  name="x"
	 */
	private int x;
	/**
	 * @uml.property  name="y"
	 */
	private int y;
	
	public Coordinate(int ax, int ay){
		this.x = ax;
		this.y = ay;
	}
	
	
	public Coordinate() {
		this.x=-1;
		this.y=-1;
	}


	/**
	 * @param value
	 * @uml.property  name="x"
	 */
	public void setX(int value){
		this.x = value;
	}
	
	/**
	 * @param value
	 * @uml.property  name="y"
	 */
	public void setY(int value){
		this.y = value;
	}
	
	/**
	 * @return
	 * @uml.property  name="x"
	 */
	public int getX(){
		return this.x;
	}
	
	/**
	 * @return
	 * @uml.property  name="y"
	 */
	public int getY(){
		return this.y;
	}
	

	@Override
	public int compareTo(Coordinate c){
		if(this.x==c.x && this.y==c.y) return 0;
		if(this.x<c.x && this.y<c.y) return -1;
		else return 1;
	}
	

}